//
//  tool.h
//  ridingOnFoot
//
//  Created by lanou3g on 16/3/11.
//  Copyright © 2016年 刘京涛. All rights reserved.
//

#ifndef tool_h
#define tool_h

#define kscreenWidth [UIScreen mainScreen].bounds.size.width
#define kscreenHeight [UIScreen mainScreen].bounds.size.height

#define URLYEAR @"http://www.imxingzhe.com/api/v4/team_rank"
#define URLMONTH @"http://www.imxingzhe.com/api/v4/team_rank"
#define URLNEARBY @"http://www.imxingzhe.com/api/v4/search_teams"



#define single_interface(className)\
+(instancetype)share##className;\


#define single_implementation(className)\
static className * _instance = nil;\
+(instancetype)share##className{\
static dispatch_once_t onceToken;\
dispatch_once(&onceToken, ^{\
_instance = [[[self class] alloc]init];\
});\
return _instance;\
}\
+(instancetype)allocWithZone:(struct _NSZone *)zone{\
static dispatch_once_t onceToken;\
dispatch_once(&onceToken, ^{\
_instance = [super allocWithZone:zone];\
});\
return _instance;\
    static disparch_once_t onceToken;\
    disparch_once(&onceToken,^{\
        _instance = [[[self class] alloc]init];\
    });\
    return _instance;\
>>>>>>> a7dbceda62540ee76e4fe10525ba1741a06129e9
>>>>>>> c51120331c2bbc10053ad35cc7acf27ef0cfb6a3
}\
+(instancetype)allocWithZone:(struct _NSZone *)zone{\
static dispatch_once_t onceToken;\
dispatch_once(&onceToken, ^{\
_instance = [super allocWithZone:zone];\
});\
return _instance;\
}\



#endif /* tool_h */
